package com.mpq.controler;

import com.mpq.service.AsyncService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mingpingqiang on 2018/12/4/11:34
 * Created by mingpingqiang on 2018/12/4/11:34
 */
@RestController
@RequestMapping("/mpq/async")
public class AsyncController {
    private static final Logger log = LoggerFactory.getLogger(AsyncController.class);
    @Autowired
    private AsyncService asyncService;
    @GetMapping("/req")
    public String test1() throws InterruptedException {
        asyncService.task1();
        asyncService.task2();
        System.out.println("释放请求");
        return "ok";
    }
}
